<template>
	<view class="login-page">
		<view class="pt-50">
			<view class="px-40 pt-20">
				<uni-segmented-control :current="current" :values="items" :activeColor="style.primary" @clickItem="onClickItem"  />
			</view>
			<view class="content">
				<view v-if="current === 0"><Login /></view>
				<view v-if="current === 1"><Register /></view>
			</view>
		</view>
	</view>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import Login from "./components/login.vue";
import Register from "./components/register.vue";
import style from '../../assets/css/variables.module.scss';

const items = ref(['登录', '注册']);
const current = ref(0);
const onClickItem = (e: any) => {
	current.value = e.currentIndex;
}

</script>

<style lang="scss">
.login-page {
}
.uni-forms-item {
	margin: 0px !important;
}
</style>
